package com.tonghaibo.service.impl;

import com.tonghaibo.dao.BookDao;
import com.tonghaibo.po.Book;
import com.tonghaibo.service.BookService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Bean;
import org.springframework.stereotype.Service;

import java.util.List;


/**
 * @author jitwxs
 * @date 2025年04月27日 21:48
 */
@Service
public class BookServiceImp implements BookService {
    @Autowired
    private BookDao bookDao;
    @Override
    public List<Book> findAll() {
        return bookDao.findAll();
    }

    @Override
    public Book findById(Integer id) {
        return bookDao.findById(id);
    }

    @Override
    public boolean inster(Book book) {
        bookDao.inster(book);
        return true;
    }


    @Override
    public boolean delectById(Integer id) {
        bookDao.delectById(id);
        return true;
    }
}
